package com.adnaan.backend.service;

import com.adnaan.backend.entity.SysPermission;
import com.adnaan.backend.entity.dto.PermissionTree;
import com.adnaan.backend.entity.vo.RoleAuthority;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface SysPermissionService extends IService<SysPermission> {

    /**
     * 处理查询结果，父子关系
     *
     * @param records
     */
    void tree(List<SysPermission> records);

    List<PermissionTree> permissionTree(List<SysPermission> list);

    List<Long> getPermissionByRoleId(Long roleId);

    boolean assignPermission(RoleAuthority roleAuthority);
}